<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
   header('Content-Type:text/html;charset=utf-8');
   //第一步;连接数据库db_bbs
   $db=new mysqli('localhost', 'root', '', 'car2', 3306);
   //检测是否连接成功
   if ($db->connect_errno){
       
       die("连接失败,出错信息是".$db->connect_error);
   }
   
   $db->query("set names utf8");